﻿
@{
    Layout = "~/Views/Shared/_LayoutMobile.cshtml";
    ViewBag.Title = ViewBag.Name;
}
<link href="~/layui/css/layui.css" rel="stylesheet" />
<style>
    #tklDiv {
        text-align: center;
    }
    #weixin-tt {
        text-align: center;
        margin-top: 10px;
    }

        #weixin-tt .fq-goods {
            border: .2rem #f3e7e3 dashed;
            padding: 3px;
            margin: 10px 0;
        }
</style>

<div>
    <img src="@ViewBag.BGM" />
</div>
<div>
    <div id="tklDiv">
        <h3 style="background-color: #FF4351; color:#fff;">1、复制淘口令 2、打开手机淘宝 3、自动弹出活动页面</h3>
        <div class="layui-m-layercont">
            <div id="weixin-tt">
                <div class="am-margin-top am-text-left" _hover-ignore="1">
                    <div class="fq-goods am-text-center am-margin-top-sm">
                        <div class="fq-explain  am-center am-text-center">
                        </div>
                        <span id="copy_key_ios" style="display: none;padding:0;">复制框内整段文字，打开👉手淘👈即可「领取优惠券」并购买@(ViewBag.TKL)</span>
                        <textarea readonly="" id="copy_key_android" type="text" class="am-form-field am-text-center am-text-mss pt10" oninput="regain();" style="font-size: 14px;height:8rem;padding:0;">复制框内整段文字，打开👉手淘👈即可「领取优惠券」并购买@(ViewBag.TKL)</textarea>
                        <div class="clear"></div>
                    </div>
                </div>
                <button type="button" id="copybtn" class="layui-btn layui-btn-radius layui-btn-danger" data-clipboard-action="copy" data-clipboard-target="#copy_key_android">点我复制</button>
            </div>
        </div>
    </div>
</div>
<script src="~/Scripts/jquery-3.4.1.min.js"></script>
<script src="~/layui/layui.js"></script>
<script>
    $(function () {
        layui.use('layer', function () {
            var layer = layui.layer;
            //点击复制
            $(document).on('click', '#copybtn', function () {
                var Url = document.getElementById("copy_key_android");
                Url.select();
                document.execCommand("Copy");
                layer.msg("复制成功,打开淘宝即刻查看！");
            });
        });
        
    });
</script>